package com.atguigu.lease.common.exception;

import com.atguigu.lease.common.result.ResultCodeEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author yjf
 * @version 1.0
 * @description: TODO
 * @date 2024/9/10 16:31
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class LeaseException extends RuntimeException{
    private Integer code;
    private String message;

    public LeaseException(ResultCodeEnum resultCodeEnum){
        this.code =resultCodeEnum.getCode();
        this.message = resultCodeEnum.getMessage();
    }
}
